package dom4j;

import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;

public class CreateXmlTest {

	public static void main(String[] args) {
		
		Document doc = DocumentHelper.createDocument();
		Element ele = DocumentHelper.createElement("xml");
		doc.setRootElement(ele);
		for(char i = 'a';  i < 'g'; i++){
			
			Element sub = ele.addElement(i + "");
			sub.setText("text:" + i);
		}
		System.out.println(doc.asXML());
	}
}
